package com.ruoyi.system.wnjk.service.impl;

import java.util.List;

import com.ruoyi.system.wnjk.domain.po.WnjkUser;
import com.ruoyi.system.wnjk.mapper.WnjkUserMapper;
import com.ruoyi.system.wnjk.service.IWnjkUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;


/**
 * 用户账号Service业务层处理
 *
 * @author ruoyi
 * @date 2025-03-07
 */
@Service
public class WnjkUserServiceImpl implements IWnjkUserService
{
    @Autowired
    private WnjkUserMapper wnjkUserMapper;

    /**
     * 查询用户账号
     *
     * @param id 用户账号主键
     * @return 用户账号
     */
    @Override
    public WnjkUser selectWnjkUserById(Long id)
    {
        return wnjkUserMapper.selectWnjkUserById(id);
    }

    /**
     * 查询用户账号列表
     *
     * @param wnjkUser 用户账号
     * @return 用户账号
     */
    @Override
    public List<WnjkUser> selectWnjkUserList(WnjkUser wnjkUser)
    {
        return wnjkUserMapper.selectWnjkUserList(wnjkUser);
    }

    /**
     * 新增用户账号
     *
     * @param wnjkUser 用户账号
     * @return 结果
     */
    @Override
    public int insertWnjkUser(WnjkUser wnjkUser)
    {
        return wnjkUserMapper.insertWnjkUser(wnjkUser);
    }

    /**
     * 修改用户账号
     *
     * @param wnjkUser 用户账号
     * @return 结果
     */
    @Override
    public int updateWnjkUser(WnjkUser wnjkUser)
    {
        return wnjkUserMapper.updateWnjkUser(wnjkUser);
    }

    /**
     * 批量删除用户账号
     *
     * @param ids 需要删除的用户账号主键
     * @return 结果
     */
    @Override
    public int deleteWnjkUserByIds(Long[] ids)
    {
        return wnjkUserMapper.deleteWnjkUserByIds(ids);
    }

    /**
     * 删除用户账号信息
     *
     * @param id 用户账号主键
     * @return 结果
     */
    @Override
    public int deleteWnjkUserById(Long id)
    {
        return wnjkUserMapper.deleteWnjkUserById(id);
    }

    @Override
    public WnjkUser findByPhone(String phone) {
        return wnjkUserMapper.findByPhone(phone);
    }
}
